import { Widget } from "./widget";


export class TextBox extends Widget {

    static {
        globalThis.__TextBox__ = new TextBox();
    }


    static create(): TextBox {
        return Deno.core.ops.opCreateTextBox();
    }

    get text() {
        return Deno.core.ops.opGetTextBoxText(this);
    }

    set text(str: string) {
        Deno.core.ops.opSetTextBoxText(this, str);
    }

    get placeholder() {
        return Deno.core.ops.opGetTextBoxHintText(this);
    }

    set placeholder(str: string) {
        Deno.core.ops.opSetTextBoxHintText(this, str);
    }

}